package model.conditions;

import metier.GameState;
import metier.Objet;

public class RepresentationCondition extends Condition {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6728747028117250246L;
	protected String idRepresentation;

	public RepresentationCondition() {
		super();
	}
	
	public RepresentationCondition(String idRepresentation) {
		super();
		this.idRepresentation = idRepresentation;
	}

	@Override
	public boolean verify(GameState state, Objet sender) {
		boolean res = false;
		if(sender.getRepresentation().getId(sender.getPosition().getColumn(), sender.getPosition().getRow()).equals(idRepresentation)) 
			res = true;
			
		if(!inverse) {
			return res;
		} else {
			return !res;
		}
	}

	public String getIdRepresentation() {
		return idRepresentation;
	}

	public void setIdRepresentation(String idRepresentation) {
		this.idRepresentation = idRepresentation;
	}
	
	

}
